﻿using System;
using System.Collections.Generic;
using System.Linq;

namespace Mercenary
{

	public class PvpNormal : IStrategy
	{


		public static string StrategyName = UiItemConst.策略_PVP通用.m_name;
		public (int hand_index, int play_index) GetEnterOrder(List<Target> hand_mercenaries, List<Target> play_mercenaries)
		{
			int mid = StrategyUtils.FindMercenaryIndexForName("鞭笞者特里高雷", play_mercenaries);
			if (StrategyUtils.FindSpecNameTarget("鞭笞者特里高雷", play_mercenaries) != null)
				mid = StrategyUtils.FindMercenaryIndexForName("鞭笞者特里高雷", play_mercenaries);
			else if(StrategyUtils.FindSpecNameTarget("变装大师", play_mercenaries) != null)
				mid = StrategyUtils.FindMercenaryIndexForName("变装大师", play_mercenaries);
			else if (StrategyUtils.FindSpecNameTarget("奈姆希·灵沼", play_mercenaries) != null)
				mid = StrategyUtils.FindMercenaryIndexForName("奈姆希·灵沼", play_mercenaries);
			if (mid == 0)
				return (0, mid);
			else if (mid > 0)
				return (0, mid + 1);
			return (0, play_mercenaries.Count);
		}
		public List<BattleTarget> GetBattleTargets(int turn, List<Target> targets_opposite_all, List<Target> targets_friendly_all, List<Target> targets_opposite_graveyrad)
		{
			List<BattleTarget> list = new List<BattleTarget>();
			var targets_opposite_valid = targets_opposite_all.FindAll((Target t) => t.Enable == true);
			var targets_friendly = targets_friendly_all.FindAll((Target t) => t.Enable == true);

			try
			{
				foreach (var merc_iter in targets_friendly_all)
				{
					//*********************************************奥术龙策略****************************************//
					if (merc_iter.Name == "奈法利安")
					{
						List<Target> focusTargets = new List<Target>();
						string[] preKills = new string[]
						{   "鞭笞者特里高雷",
							"梦魇毒蛇","安娜科德拉", "周卓","玛法里奥·怒风","古夫·符文图腾",
							"沃金","魔像师卡扎库斯","艾萨拉女王","恩佐斯","希尔瓦娜斯·风行者",
							"伊莉斯·逐星",
							"冰雪之王洛克霍拉","巴琳达·斯通赫尔斯","泰兰德·语风", "希奈丝特拉",
							"珑心", "米尔豪斯·法力风暴",
						};
						for (int i = 0; i < preKills.Length; i++)
						{
							focusTargets.Add(StrategyUtils.FindSpecNameTarget(preKills[i], targets_opposite_valid));
						}
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(targets_opposite_valid));
						Target common_target = StrategyUtils.GetTarget(focusTargets);

						list.Add(new BattleTarget()
						{
							TargetId = common_target?.Id ?? -1,
							TargetName = common_target?.Name ?? "",
							SkillId = StrategyUtils.FindSkillForName("龙人突袭", merc_iter)?.Id ?? -1,
							SkillName = "龙人突袭",
						});

					}
					else if (merc_iter.Name == "鞭笞者特里高雷")
					{
						list.Add(new BattleTarget()
						{
							SkillId = StrategyUtils.FindSkillForName("反冲", merc_iter)?.Id ?? -1,
							SkillName = "反冲",
						});
					}
					else if (merc_iter.Name == "雷诺·杰克逊")
					{
						List<Target> focusTargets = new List<Target>();
						string[] preKills = new string[]
						{   "鞭笞者特里高雷",
							"梦魇毒蛇", "安娜科德拉",
							 "恩佐斯","亚煞极","沃金",
							"吉安娜·普罗德摩尔", "冰雪之王洛克霍拉",
							"米尔豪斯·法力风暴" , "安东尼达斯"
						};
						for (int i = 0; i < preKills.Length; i++)
						{
							focusTargets.Add(StrategyUtils.FindSpecNameTarget(preKills[i], targets_opposite_valid));
						}
						//打红色
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role == TAG_ROLE.TANK)));
						//打佣兵
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role != TAG_ROLE.NEUTRAL && t.Role != TAG_ROLE.INVALID)));

						Target common_target = StrategyUtils.GetTarget(focusTargets);
						if (null != StrategyUtils.FindSpecNameTarget("提里奥·弗丁", targets_friendly))
						{
							list.Add(new BattleTarget()
							{
								SkillId = StrategyUtils.FindSkillForName("宝藏是我的", merc_iter)?.Id ?? -1,
								SkillName = "宝藏是我的",
							});
						}
						list.Add(new BattleTarget()
						{
							TargetId = common_target?.Id ?? -1,
							TargetName = common_target?.Name ?? "",
							SkillId = StrategyUtils.FindSkillForName("傲人肌肉", merc_iter)?.Id ?? -1,
							SkillName = "傲人肌肉",
						});
					}
					else if (merc_iter.Name == "奥妮克希亚")
					{
						List<Target> focusTargets = new List<Target>();
						string[] preKills = new string[]
						{   "鞭笞者特里高雷",
							"梦魇毒蛇","安娜科德拉", "周卓","玛法里奥·怒风",
							"沃金","魔像师卡扎库斯","艾萨拉女王","恩佐斯","希尔瓦娜斯·风行者",
							"伊莉斯·逐星",
							"冰雪之王洛克霍拉","巴琳达·斯通赫尔斯",
						};
						for (int i = 0; i < preKills.Length; i++)
						{
							focusTargets.Add(StrategyUtils.FindSpecNameTarget(preKills[i], targets_opposite_valid));
						}
						//打红色
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role == TAG_ROLE.TANK)));
						//打佣兵
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role != TAG_ROLE.NEUTRAL && t.Role != TAG_ROLE.INVALID)));

						Target common_target = StrategyUtils.GetTarget(focusTargets);

						list.Add(new BattleTarget()
						{
							SkillId = StrategyUtils.FindSkillForName("深呼吸", merc_iter)?.Id ?? -1,
							SkillName = "深呼吸",
						});
						list.Add(new BattleTarget()
						{
							SkillId = StrategyUtils.FindSkillForName("清理巢穴", merc_iter)?.Id ?? -1,
							SkillName = "清理巢穴",
						});
						list.Add(new BattleTarget()
						{
							TargetId = common_target?.Id ?? -1,
							TargetName = common_target?.Name ?? "",
							SkillId = StrategyUtils.FindSkillForName("傲慢的凡人", merc_iter)?.Id ?? -1,
							SkillName = "傲慢的凡人",
						});
					}
					else if (merc_iter.Name == "凯恩·血蹄")
					{
						List<Target> focusTargets = new List<Target>();

						//打绿色
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role == TAG_ROLE.CASTER)));
						//打佣兵
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role != TAG_ROLE.NEUTRAL && t.Role != TAG_ROLE.INVALID)));

						Target common_target = StrategyUtils.GetTarget(focusTargets);

						if (null != StrategyUtils.FindSpecNameTarget("奥妮克希亚", targets_friendly_all))
						{
							list.Add(new BattleTarget()
							{
								SkillId = StrategyUtils.FindSkillForName("坚韧光环", merc_iter)?.Id ?? -1,
								SkillName = "坚韧光环",
							});

							list.Add(new BattleTarget()
							{
								SkillId = StrategyUtils.FindSkillForName("大地践踏", merc_iter)?.Id ?? -1,
								SkillName = "大地践踏",
							});
						}
						else
						{
							list.Add(new BattleTarget()
							{
								SkillId = StrategyUtils.FindSkillForName("大地践踏", merc_iter)?.Id ?? -1,
								SkillName = "大地践踏",
							});
							if (targets_friendly_all.Count > 1)//如果有人需要加速
								list.Add(new BattleTarget()
								{
									SkillId = StrategyUtils.FindSkillForName("坚韧光环", merc_iter)?.Id ?? -1,
									SkillName = "坚韧光环",
								});
						}

						list.Add(new BattleTarget()
						{
							TargetId = common_target?.Id ?? -1,
							TargetName = common_target?.Name ?? "",
							SkillId = StrategyUtils.FindSkillForName("先祖勾拳", merc_iter)?.Id ?? -1,
							SkillName = "先祖勾拳",
						});

					}
					else if (merc_iter.Name == "泰兰德·语风")
					{
						if (null != StrategyUtils.FindSpecNameTarget("贝恩·血蹄", targets_friendly_all)
							|| null != StrategyUtils.FindSpecNameTarget("伊瑟拉", targets_friendly_all))
						{
							list.Add(new BattleTarget()
							{
								SkillId = StrategyUtils.FindSkillForName("艾露恩的赐福", merc_iter)?.Id ?? -1,
								SkillName = "艾露恩的赐福",
							});
						}
						list.Add(new BattleTarget()
						{
							SkillId = StrategyUtils.FindSkillForName("奥术齐射", merc_iter)?.Id ?? -1,
							SkillName = "奥术齐射",
						});
					}
					else if (merc_iter.Name == "米尔豪斯·法力风暴")
					{
						list.Add(new BattleTarget()
						{
							SkillId = StrategyUtils.FindSkillForName("魔爆术", merc_iter)?.Id ?? -1,
							SkillName = "魔爆术",
						});
					}
					else if (merc_iter.Name == "穆克拉")
					{
						List<Target> focusTargets = new List<Target>();
						string[] preKills = new string[]
						{   "鞭笞者特里高雷",
							"梦魇毒蛇","安娜科德拉", "周卓","玛法里奥·怒风","古夫·符文图腾",
							"沃金","魔像师卡扎库斯","艾萨拉女王","恩佐斯","希尔瓦娜斯·风行者",
							"伊莉斯·逐星",
							"冰雪之王洛克霍拉","巴琳达·斯通赫尔斯","泰兰德·语风", "希奈丝特拉",
							"珑心", "米尔豪斯·法力风暴",
						};
						for (int i = 0; i < preKills.Length; i++)
						{
							focusTargets.Add(StrategyUtils.FindSpecNameTarget(preKills[i], targets_opposite_valid));
						}
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(targets_opposite_valid));
						Target common_target = StrategyUtils.GetTarget(focusTargets);

						list.Add(new BattleTarget()
						{
							TargetId = common_target?.Id ?? -1,
							TargetName = common_target?.Name ?? "",
							SkillId = StrategyUtils.FindSkillForName("暴食香蕉", merc_iter)?.Id ?? -1,
							SkillName = "暴食香蕉",
						});
					}
					else if (merc_iter.Name == "珑心")
					{

						List<Target> focusTargets = new List<Target>();
						string[] preKills = new string[]
						{
							"黄金猿","鞭笞者特里高雷","玉珑","冰雪之王洛克霍拉", "凯恩·血蹄" ,
							"伊莉斯·逐星","巫妖王","穆克拉"
						};
						for (int i = 0; i < preKills.Length; i++)
						{
							focusTargets.Add(StrategyUtils.FindSpecNameTarget(preKills[i], targets_opposite_valid));
						}
						//打红色
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role == TAG_ROLE.TANK)));
						//打佣兵
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role != TAG_ROLE.NEUTRAL && t.Role != TAG_ROLE.INVALID)));

						Target common_target = StrategyUtils.GetTarget(focusTargets);
						list.Add(new BattleTarget()
						{
							SkillId = StrategyUtils.FindSkillForName("星火祝福", merc_iter)?.Id ?? -1,
							SkillName = "星火祝福",
						});
						list.Add(new BattleTarget()
						{
							TargetId = common_target?.Id ?? -1,
							TargetName = common_target?.Name ?? "",
							SkillId = StrategyUtils.FindSkillForName("天神之息", merc_iter)?.Id ?? -1,
							SkillName = "天神之息",
						});
					}
					else if (
						merc_iter.Name.IndexOf("龙人") == 0 ||
						merc_iter.Name.IndexOf("奥妮克希亚雏龙") == 0 ||
						merc_iter.Name.IndexOf("穆克拉的大表哥") == 0
						)
					{
						List<Target> focusTargets = new List<Target>();
						string[] preKills = new string[]
						{   "鞭笞者特里高雷",
							"梦魇毒蛇","安娜科德拉", "周卓","玛法里奥·怒风",
							"沃金","魔像师卡扎库斯","艾萨拉女王","恩佐斯","希尔瓦娜斯·风行者",
							"伊莉斯·逐星",
							"冰雪之王洛克霍拉","巴琳达·斯通赫尔斯","泰兰德·语风", "希奈丝特拉",
							"珑心", "米尔豪斯·法力风暴",
						};
						for (int i = 0; i < preKills.Length; i++)
						{
							focusTargets.Add(StrategyUtils.FindSpecNameTarget(preKills[i], targets_opposite_valid));
						}
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(targets_opposite_valid));
						Target common_target = StrategyUtils.GetTarget(focusTargets);

						list.Add(new BattleTarget()
						{
							TargetId = common_target?.Id ?? -1,
							TargetName = common_target?.Name ?? "",
							SkillId = StrategyUtils.FindSkillForName("攻击", merc_iter)?.Id ?? -1,
							SkillName = "攻击",
						});
					}
					//*********************************************古神队策略****************************************//
					else if (merc_iter.Name == "恩佐斯")
					{
						//目前只抓这两个随从，有收益
						if (null != StrategyUtils.FindSpecNameTarget("梦魇毒蛇", targets_opposite_all)
						|| null != StrategyUtils.FindSpecNameTarget("尤朵拉的火炮", targets_opposite_all)) //如果有随从，优先2技能
						{
							Console.WriteLine("有蛇/火炮");
							list.Add(new BattleTarget()
							{
								SkillId = StrategyUtils.FindSkillForName("恩佐斯之赐", merc_iter)?.Id ?? -1,
								SkillName = "恩佐斯之赐",
							});
						}
						else if ((
								//通用情况1 如果两随从，有个克苏恩的触手，不值得开大，给克苏恩减cd更好
								targets_friendly_all.Count == 5 && null == StrategyUtils.FindMercenaryForName("克苏恩的触手", targets_friendly_all))
								//通用情况2， 如果有6个随从，直接开
								|| targets_friendly_all.Count == 6
								//针对尤朵拉海盗队，开局抓炮，有1/3的概率存活，如果不3技能，也活不到下个回合，打输出
								|| null != StrategyUtils.FindMercenaryForName("尤朵拉的火炮", targets_friendly_all)
								//针对娜迦探险队，尽量不让贝恩的大招触发击杀效果
								|| null != StrategyUtils.FindMercenaryForName("贝恩·血蹄", targets_opposite_all)
								//针对敌方这个三个首发，第二回合，如果敌方亚煞极不开大，恩佐斯打输出，否则就死了
								|| null != StrategyUtils.FindSpecNameTarget("亚煞极", targets_opposite_all)
								&& null != StrategyUtils.FindSpecNameTarget("魔像师卡扎库斯", targets_opposite_all)
								&& null != StrategyUtils.FindSpecNameTarget("沃金", targets_opposite_all)
							)
						{
							list.Add(new BattleTarget()
							{
								SkillId = StrategyUtils.FindSkillForName("腐化脏器", merc_iter)?.Id ?? -1,
								SkillName = "腐化脏器",
							});
						}
						//其他情况默认1技能
						list.Add(new BattleTarget()
						{
							SkillId = StrategyUtils.FindSkillForName("恩佐斯的子嗣", merc_iter)?.Id ?? -1,
							SkillName = "恩佐斯的子嗣",
						});
					}
					else if (merc_iter.Name == "尤格-萨隆")
					{
						if (true == StrategyUtils.Relevance_Pirate(targets_opposite_all.Concat(targets_opposite_graveyrad).ToList<Target>()))
						{   //针对尤朵拉海盗队
							List<Target> focusTargets = new List<Target>();
							focusTargets.Add(StrategyUtils.FindSpecNameTarget("鞭笞者特里高雷", targets_opposite_all));
							focusTargets.Add(StrategyUtils.FindSpecNameTarget("艾德温，迪菲亚首脑", targets_opposite_all));

							focusTargets.Add(StrategyUtils.FindMinHealthTarget(
								targets_opposite_valid.FindAll((Target t) => t.Role == TAG_ROLE.TANK)));
							//打佣兵
							focusTargets.Add(StrategyUtils.FindMinHealthTarget(
								targets_opposite_valid.FindAll((Target t) => t.Role != TAG_ROLE.NEUTRAL && t.Role != TAG_ROLE.INVALID)));
							Target common_target = StrategyUtils.GetTarget(focusTargets);
							if (common_target != null)
								Console.WriteLine("尤朵拉海盗队，Target:{0}", common_target.Name);
							list.Add(new BattleTarget()
							{
								TargetId = common_target?.Id ?? -1,
								TargetName = common_target?.Name ?? "",
								SkillId = StrategyUtils.FindSkillForName("狂乱凝视", merc_iter)?.Id ?? -1,
								SkillName = "狂乱凝视",
							});
						}
						else
						{
							List<Target> focusTargets = new List<Target>();
							focusTargets.Add(StrategyUtils.FindSpecNameTarget("克苏恩", targets_friendly));
							focusTargets.Add(StrategyUtils.FindSpecNameTarget("尤格-萨隆", targets_friendly));
							Target common_target = StrategyUtils.GetTarget(focusTargets);

							if (null != StrategyUtils.FindSpecNameTarget("希尔瓦娜斯·风行者", targets_opposite_all)
							|| null != StrategyUtils.FindSpecNameTarget("潮汐主母阿茜萨", targets_opposite_all))
							{   //只有娜迦队/或者10速的女王，才有可能让导演放出15速的技能
								list.Add(new BattleTarget()
								{
									SkillId = StrategyUtils.FindSkillForName("古神在上", merc_iter)?.Id ?? -1,
									SkillName = "古神在上",
								});
							}
							if (targets_friendly_all.Count == 1)
							{
								list.Add(new BattleTarget()
								{
									SkillId = StrategyUtils.FindSkillForName("狂乱凝视", merc_iter)?.Id ?? -1,
									SkillName = "狂乱凝视",
								});
							}
							list.Add(new BattleTarget()
							{
								TargetId = common_target?.Id ?? -1,
								TargetName = common_target?.Name ?? "",
								TargetType = TARGETTYPE.FRIENDLY,
								SkillId = StrategyUtils.FindSkillForName("心灵癫狂", merc_iter)?.Id ?? -1,
								SkillName = "心灵癫狂",
							});
						}
					}
					else if (merc_iter.Name == "克苏恩")
					{
						List<Target> focusTargets = new List<Target>();
						//克苏恩的集火目标
						string[] preKills = new string[]
						{   "周卓","鞭笞者特里高雷",
							"沃金","尤格-萨隆","贝恩·血蹄","艾萨拉女王","魔像师卡扎库斯","恩佐斯","希尔瓦娜斯·风行者",
							"艾德温，迪菲亚首脑","伊莉斯·逐星",
							"冰雪之王洛克霍拉",
						};
						for (int i = 0; i < preKills.Length; i++)
						{
							focusTargets.Add(StrategyUtils.FindSpecNameTarget(preKills[i], targets_opposite_valid));
						}
						//打蓝色
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role == TAG_ROLE.CASTER)));
						//打佣兵
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role != TAG_ROLE.NEUTRAL && t.Role != TAG_ROLE.INVALID)));
						//
						Target common_target = StrategyUtils.GetTarget(focusTargets);

						if (targets_opposite_all.Count == 1 && targets_opposite_all[0].Health <= 5 && targets_opposite_all[0].Name == "克苏恩")
						{
							list.Add(new BattleTarget()
							{
								SkillId = StrategyUtils.FindSkillForName("克苏恩的触手", merc_iter)?.Id ?? -1,
								SkillName = "克苏恩的触手",
							});
						}
						list.Add(new BattleTarget()
						{
							SkillId = StrategyUtils.FindSkillForName("克苏恩面具", merc_iter)?.Id ?? -1,
							SkillName = "克苏恩面具",
						});
						list.Add(new BattleTarget()
						{
							TargetId = common_target?.Id ?? -1,
							TargetName = common_target?.Name ?? "",
							SkillId = StrategyUtils.FindSkillForName("精神鞭笞", merc_iter)?.Id ?? -1,
							SkillName = "精神鞭笞",
						});
					}
					else if (merc_iter.Name == "变装大师")
					{


						list.Add(new BattleTarget()
						{
							SkillId = StrategyUtils.FindSkillForName("流变打击", merc_iter)?.Id ?? -1,
							SkillName = "流变打击",
						});
						list.Add(new BattleTarget()
						{
							SkillId = StrategyUtils.FindSkillForName("邪恶计谋", merc_iter)?.Id ?? -1,
							SkillName = "邪恶计谋",
						});
					}
					else if (merc_iter.Name == "沃金")
					{
						List<Target> focusTargets = new List<Target>();
						string[] preKills = new string[]
						{   "黄金猿","鞭笞者特里高雷", "艾德温，迪菲亚首脑",
							"伊莉斯·逐星","冰雪之王洛克霍拉","希尔瓦娜斯·风行者","沃金",
							"玉珑", "周卓", "亚煞极","恩佐斯"
						};
						for (int i = 0; i < preKills.Length; i++)
						{
							focusTargets.Add(StrategyUtils.FindSpecNameTarget(preKills[i], targets_opposite_valid));
						}
						//打红色
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role == TAG_ROLE.TANK)));
						//打佣兵
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role != TAG_ROLE.NEUTRAL && t.Role != TAG_ROLE.INVALID)));

						Target common_target = StrategyUtils.GetTarget(focusTargets);

						if (null != StrategyUtils.FindSpecNameTarget("克苏恩", targets_friendly_all)
						|| null != StrategyUtils.FindSpecNameTarget("变装大师", targets_friendly_all))//古神队队32
						{
							list.Add(new BattleTarget()
							{
								SkillId = StrategyUtils.FindSkillForName("虚弱诅咒", merc_iter)?.Id ?? -1,
								SkillName = "虚弱诅咒",
							});
							list.Add(new BattleTarget()
							{
								SkillId = StrategyUtils.FindSkillForName("暗影涌动", merc_iter)?.Id ?? -1,
								SkillName = "暗影涌动",
							});
						}
						else//其他23
						{
							list.Add(new BattleTarget()
							{
								SkillId = StrategyUtils.FindSkillForName("暗影涌动", merc_iter)?.Id ?? -1,
								SkillName = "暗影涌动",
							});
							list.Add(new BattleTarget()
							{
								SkillId = StrategyUtils.FindSkillForName("虚弱诅咒", merc_iter)?.Id ?? -1,
								SkillName = "虚弱诅咒",
							});
						}
						list.Add(new BattleTarget()
						{
							TargetId = common_target?.Id ?? -1,
							TargetName = common_target?.Name ?? "",
							SkillId = StrategyUtils.FindSkillForName("暗影震击", merc_iter)?.Id ?? -1,
							SkillName = "暗影震击",
						});
					}
					else if (merc_iter.Name == "亚煞极")
					{
						List<Target> focusTargets = new List<Target>();
						string[] preKills = new string[]
						{   "瓦莉拉·萨古纳尔","鞭笞者特里高雷",
							"安娜科德拉", "周卓","克苏恩",
							"沃金","艾萨拉女王","魔像师卡扎库斯","恩佐斯","希尔瓦娜斯·风行者",
							"艾德温，迪菲亚首脑","尤朵拉","伊莉斯·逐星",
							"冰雪之王洛克霍拉","巴琳达·斯通赫尔斯",
						};
						for (int i = 0; i < preKills.Length; i++)
						{
							focusTargets.Add(StrategyUtils.FindSpecNameTarget(preKills[i], targets_opposite_all));
						}
						//打绿色
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role == TAG_ROLE.FIGHTER)));
						//打佣兵
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role != TAG_ROLE.NEUTRAL && t.Role != TAG_ROLE.INVALID)));

						Target common_target = StrategyUtils.GetTarget(focusTargets);

						if (null != StrategyUtils.FindMercenaryForName("希尔瓦娜斯·风行者", targets_friendly_all)
						|| (null != StrategyUtils.FindMercenaryForName("克苏恩", targets_friendly_all)
						&& null == StrategyUtils.FindMercenaryForName("沃金", targets_friendly_all))
						)
						{   //暗影队 女王登场
							//古神队，克苏恩登场，沃金没上场，减cd
							list.Add(new BattleTarget()
							{
								SkillId = StrategyUtils.FindSkillForName("无羁之怒", merc_iter)?.Id ?? -1,
								SkillName = "无羁之怒",
							});
							list.Add(new BattleTarget()
							{
								SkillId = StrategyUtils.FindSkillForName("亚煞极之力", merc_iter)?.Id ?? -1,
								SkillName = "亚煞极之力",
							});
						}
						else if (
								null != StrategyUtils.FindMercenaryForName("魔像师卡扎库斯", targets_friendly_all)
							|| null != StrategyUtils.FindMercenaryForName("沃金", targets_friendly_all))
						{   //暗影队
							list.Add(new BattleTarget()
							{
								SkillId = StrategyUtils.FindSkillForName("无羁之怒", merc_iter)?.Id ?? -1,
								SkillName = "无羁之怒",
							});
							list.Add(new BattleTarget()
							{
								TargetId = common_target?.Id ?? -1,
								TargetName = common_target?.Name ?? "",
								SkillId = StrategyUtils.FindSkillForName("亵渎攻击", merc_iter)?.Id ?? -1,
								SkillName = "亵渎攻击",
							});
						}
						else if (turn <= 2)//古神队 前两个回合
						{
							list.Add(new BattleTarget()
							{
								SkillId = StrategyUtils.FindSkillForName("无羁之怒", merc_iter)?.Id ?? -1,
								SkillName = "无羁之怒",
							});
							list.Add(new BattleTarget()
							{
								SkillId = StrategyUtils.FindSkillForName("亚煞极之力", merc_iter)?.Id ?? -1,
								SkillName = "亚煞极之力",
							});
						}
						else //其他情况的默认
						{
							list.Add(new BattleTarget()
							{
								SkillId = StrategyUtils.FindSkillForName("无羁之怒", merc_iter)?.Id ?? -1,
								SkillName = "无羁之怒",
							});
							list.Add(new BattleTarget()
							{
								TargetId = common_target?.Id ?? -1,
								TargetName = common_target?.Name ?? "",
								SkillId = StrategyUtils.FindSkillForName("亵渎攻击", merc_iter)?.Id ?? -1,
								SkillName = "亵渎攻击",
							});
						}

					}
					else if (merc_iter.Name.IndexOf("克苏恩的触手") == 0 ||
						merc_iter.Name.IndexOf("恩佐斯的子嗣") == 0)
					{
						List<Target> focusTargets = new List<Target>();
						string[] preKills = new string[]
						{   "周卓",
							"艾萨拉女王","魔像师卡扎库斯","恩佐斯","希尔瓦娜斯·风行者",
							"艾德温，迪菲亚首脑","伊莉斯·逐星","鞭笞者特里高雷",
							"冰雪之王洛克霍拉","巴琳达·斯通赫尔斯",
						};
						for (int i = 0; i < preKills.Length; i++)
						{
							focusTargets.Add(StrategyUtils.FindSpecNameTarget(preKills[i], targets_opposite_valid));
						}
						//打蓝色
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role == TAG_ROLE.CASTER)));
						//打佣兵
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role != TAG_ROLE.NEUTRAL && t.Role != TAG_ROLE.INVALID)));

						Target common_target = StrategyUtils.GetTarget(focusTargets);
						list.Add(new BattleTarget()
						{
							TargetId = common_target?.Id ?? -1,
							TargetName = common_target?.Name ?? "",
							SkillId = StrategyUtils.FindSkillForName("攻击", merc_iter)?.Id ?? -1,
							SkillName = "攻击",
						});
					}
					//*********************************************暗影队策略****************************************//
					else if (merc_iter.Name == "希尔瓦娜斯·风行者")
					{
						List<Target> focusTargets = new List<Target>();
						string[] preKills = new string[]
						{   "黄金猿", "沃金", "巴琳达·斯通赫尔斯","变装大师", "鞭笞者特里高雷", "伊莉斯·逐星", "嘉顿男爵",
							"冰雪之王洛克霍拉", "吉安娜·普罗德摩尔", "珑心", "米尔豪斯·法力风暴", "克苏恩",
							"希尔瓦娜斯·风行者","希奈丝特拉", "滑矛领主","游学者周卓","尤格-萨隆", "恩佐斯"
						};
						for (int i = 0; i < preKills.Length; i++)
						{
							focusTargets.Add(StrategyUtils.FindSpecNameTarget(preKills[i], targets_opposite_valid));
						}
						//打蓝色
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role == TAG_ROLE.CASTER)));
						//打佣兵
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role != TAG_ROLE.NEUTRAL && t.Role != TAG_ROLE.INVALID)));

						Target common_target = StrategyUtils.GetTarget(focusTargets);
						if (merc_iter.Health > 56)
						{
							list.Add(new BattleTarget()
							{
								SkillId = StrategyUtils.FindSkillForName("重拾灵魂", merc_iter)?.Id ?? -1,
								SkillName = "重拾灵魂",
							});
						}
						else
						{
							list.Add(new BattleTarget()
							{
								TargetId = common_target?.Id ?? -1,
								TargetName = common_target?.Name ?? "",
								SkillId = StrategyUtils.FindSkillForName("女妖之箭", merc_iter)?.Id ?? -1,
								SkillName = "女妖之箭",
							});
						}
					}
					else if (merc_iter.Name == "艾萨拉女王")
					{
						List<Target> focusTargets = new List<Target>();
						string[] preKills = new string[]
						{   "黄金猿","鞭笞者特里高雷","玉珑","冰雪之王洛克霍拉", "凯恩·血蹄" ,
							"伊莉斯·逐星","巫妖王","穆克拉"
						};
						for (int i = 0; i < preKills.Length; i++)
						{
							focusTargets.Add(StrategyUtils.FindSpecNameTarget(preKills[i], targets_opposite_valid));
						}
						//打红色
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role == TAG_ROLE.TANK)));
						//打佣兵
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role != TAG_ROLE.NEUTRAL && t.Role != TAG_ROLE.INVALID)));

						Target common_target = StrategyUtils.GetTarget(focusTargets);

						if (null != StrategyUtils.FindMercenaryForName("沃金", targets_friendly_all))
						{
							list.Add(new BattleTarget()
							{
								SkillId = StrategyUtils.FindSkillForName("法师巅峰", merc_iter)?.Id ?? -1,
								SkillName = "法师巅峰",
							});
							list.Add(new BattleTarget()
							{
								SkillId = StrategyUtils.FindSkillForName("傲人训诫", merc_iter)?.Id ?? -1,
								SkillName = "傲人训诫",
							});
						}
						else if (common_target == null)
						{
							list.Add(new BattleTarget()
							{
								SkillId = StrategyUtils.FindSkillForName("傲人训诫", merc_iter)?.Id ?? -1,
								SkillName = "傲人训诫",
							});
						}
						list.Add(new BattleTarget()
						{
							TargetId = common_target?.Id ?? -1,
							TargetName = common_target?.Name ?? "",
							SkillId = StrategyUtils.FindSkillForName("变换之潮", merc_iter)?.Id ?? -1,
							SkillName = "变换之潮",
						});
					}
					else if (merc_iter.Name == "巫妖王")
					{

						if (null != StrategyUtils.FindMercenaryForName("希尔瓦娜斯·风行者", targets_friendly_all) &&
							null != StrategyUtils.FindMaxLossHealthTarget(targets_friendly))
						{
							List<Target> focusTargets = new List<Target>();
							focusTargets.Add(StrategyUtils.FindMaxLossHealthTarget(targets_friendly));
							Target common_target = StrategyUtils.GetTarget(focusTargets);
							list.Add(new BattleTarget()
							{
								TargetId = common_target?.Id ?? -1,
								TargetName = common_target?.Name ?? "",
								SkillId = StrategyUtils.FindSkillForName("凋零缠绕", merc_iter)?.Id ?? -1,
								TargetType = TARGETTYPE.FRIENDLY,
								SkillName = "凋零缠绕",
							});
						}
						else
						{
							List<Target> focusTargets = new List<Target>();
							string[] preKills = new string[]
							{
								"黄金猿", "泰兰德·语风", "迪亚波罗", "希奈丝特拉", "冰雪之王洛克霍拉"
							};
							for (int i = 0; i < preKills.Length; i++)
							{
								focusTargets.Add(StrategyUtils.FindSpecNameTarget(preKills[i], targets_opposite_valid));
							}
							//打绿色
							focusTargets.Add(StrategyUtils.FindMinHealthTarget(
								targets_opposite_valid.FindAll((Target t) => t.Role == TAG_ROLE.CASTER)));
							//打佣兵
							focusTargets.Add(StrategyUtils.FindMinHealthTarget(
								targets_opposite_valid.FindAll((Target t) => t.Role != TAG_ROLE.NEUTRAL && t.Role != TAG_ROLE.INVALID)));

							Target common_target = StrategyUtils.GetTarget(focusTargets);
							list.Add(new BattleTarget()
							{
								TargetId = common_target?.Id ?? -1,
								TargetName = common_target?.Name ?? "",
								SkillId = StrategyUtils.FindSkillForName("凋零缠绕", merc_iter)?.Id ?? -1,
								SkillName = "凋零缠绕",
							});
						}
					}
					else if (merc_iter.Name == "魔像师卡扎库斯")
					{
						if (true == StrategyUtils.Relevance_Shadow(targets_opposite_all.Concat(targets_opposite_graveyrad).ToList<Target>()))
						{   //敌方是暗影队
							if (turn < 3)
							{
								Console.WriteLine("暗影队的前两个回合");
								list.Add(new BattleTarget()
								{
									SkillId = StrategyUtils.FindSkillForName("构筑魔像", merc_iter)?.Id ?? -1,
									SubSkillIndex = 2,
									SkillName = "构筑魔像-2",
								});
							}
							else
							{
								Console.WriteLine("暗影队的后几个回合");
								list.Add(new BattleTarget()
								{
									SkillId = StrategyUtils.FindSkillForName("暗影之爪", merc_iter)?.Id ?? -1,
									SkillName = "暗影之爪",
								});
							}
						}
						else if (null != StrategyUtils.FindMercenaryForName("瓦尔登·晨拥", targets_opposite_all) && turn < 3 ||
								null != StrategyUtils.FindMercenaryForName("泰兰德", targets_opposite_all) ||
								null != StrategyUtils.FindMercenaryForName("亚煞极", targets_friendly_all))
						{
							if (targets_friendly_all.Count == 5)
							{
								Console.WriteLine("随从满了");
								list.Add(new BattleTarget()
								{
									SkillId = StrategyUtils.FindSkillForName("构筑魔像", merc_iter)?.Id ?? -1,
									SubSkillIndex = 0,
									SkillName = "构筑魔像-0",
								});
							}
							else
							{
								Console.WriteLine("召唤圣盾");
								list.Add(new BattleTarget()
								{
									SkillId = StrategyUtils.FindSkillForName("构筑魔像", merc_iter)?.Id ?? -1,
									SubSkillIndex = 1,
									SkillName = "构筑魔像-1",
								});
							}
						}
						else if (null != StrategyUtils.FindMercenaryForName("沃金", targets_friendly_all))
						{
							Console.WriteLine("召唤嘲讽");
							list.Add(new BattleTarget()
							{
								SkillId = StrategyUtils.FindSkillForName("构筑魔像", merc_iter)?.Id ?? -1,
								SubSkillIndex = 0,
								SkillName = "构筑魔像-0",
							});
						}

						else if (null != StrategyUtils.FindMercenaryForName("希尔瓦娜斯·风行者", targets_friendly_all)
							|| null != StrategyUtils.FindMercenaryForName("鞭笞者特里高雷", targets_friendly_all))
						{
							list.Add(new BattleTarget()
							{
								SkillId = StrategyUtils.FindSkillForName("构筑魔像", merc_iter)?.Id ?? -1,
								SubSkillIndex = 2,
								SkillName = "构筑魔像-2",
							});
						}
						else
						{
							list.Add(new BattleTarget()
							{
								SkillId = StrategyUtils.FindSkillForName("暗影之爪", merc_iter)?.Id ?? -1,
								SkillName = "暗影之爪",
							});
						}

					}
					//*********************************************王冰冰策略****************************************//
					else if (merc_iter.Name == "冰雪之王洛克霍拉")
					{

						if (turn == 1 && (null != StrategyUtils.FindMercenaryForName("鞭笞者特里高雷", targets_opposite_all)
							|| null != StrategyUtils.FindMercenaryForName("冰雪之王洛克霍拉", targets_opposite_all)))
						{   //有蛇的局 王冰冰内战 2技能起手
							List<Target> focusTargets = new List<Target>();
							focusTargets.Add(StrategyUtils.FindSpecNameTarget("鞭笞者特里高雷", targets_opposite_all));
							focusTargets.Add(StrategyUtils.FindSpecNameTarget("冰雪之王洛克霍拉", targets_opposite_all));
							Target common_target = StrategyUtils.GetTarget(focusTargets);
							list.Add(new BattleTarget()
							{
								TargetId = common_target?.Id ?? -1,
								TargetName = common_target?.Name ?? "",
								SkillId = StrategyUtils.FindSkillForName("冰霜震击", merc_iter)?.Id ?? -1,
								SkillName = "冰霜震击",
							});
						}
						else
						{
							list.Add(new BattleTarget()
							{
								SkillId = StrategyUtils.FindSkillForName("冰雹", merc_iter)?.Id ?? -1,
								SkillName = "冰雹",
							});
						}
					}
					else if (merc_iter.Name == "吉安娜·普罗德摩尔")
					{
						List<Target> focusTargets = new List<Target>();
						string[] preKills = new string[]
						{
							"鞭笞者特里高雷","冰雪之王洛克霍拉","沃金","亚煞极","巫妖王", "玉珑","伊莉斯·逐星",
						};
						for (int i = 0; i < preKills.Length; i++)
						{
							focusTargets.Add(StrategyUtils.FindSpecNameTarget(preKills[i], targets_opposite_all));
						}
						//打红色
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role == TAG_ROLE.TANK)));
						//打佣兵
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role != TAG_ROLE.NEUTRAL && t.Role != TAG_ROLE.INVALID)));
						Target common_target = StrategyUtils.GetTarget(focusTargets);

						list.Add(new BattleTarget()
						{
							TargetId = common_target?.Id ?? -1,
							TargetName = common_target?.Name ?? "",
							SkillId = StrategyUtils.FindSkillForName("浮冰术", merc_iter)?.Id ?? -1,
							SkillName = "浮冰术",
						});
					}
					else if (merc_iter.Name == "瓦尔登·晨拥")
					{
						list.Add(new BattleTarget()
						{
							SkillId = StrategyUtils.FindSkillForName("急速冰冻", merc_iter)?.Id ?? -1,
							SkillName = "急速冰冻",
						});
						list.Add(new BattleTarget()
						{
							SkillId = StrategyUtils.FindSkillForName("冰风暴", merc_iter)?.Id ?? -1,
							SkillName = "冰风暴",
						});
					}
					else if (merc_iter.Name == "迪亚波罗")
					{
						List<Target> focusTargets = new List<Target>();
						//打佣兵
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role != TAG_ROLE.NEUTRAL && t.Role != TAG_ROLE.INVALID)));
						Target common_target = StrategyUtils.GetTarget(focusTargets);

						list.Add(new BattleTarget()
						{
							SkillId = StrategyUtils.FindSkillForName("火焰践踏", merc_iter)?.Id ?? -1,
							SkillName = "火焰践踏",
						});
						list.Add(new BattleTarget()
						{
							TargetId = common_target?.Id ?? -1,
							TargetName = common_target?.Name ?? "",
							SkillId = StrategyUtils.FindSkillForName("末日", merc_iter)?.Id ?? -1,
							SkillName = "末日",
						});
					}
					else if (merc_iter.Name == "希奈丝特拉")
					{
						List<Target> focusTargets = new List<Target>();
						focusTargets.Add(StrategyUtils.FindMaxLossHealthTarget(targets_friendly));
						Target common_target = StrategyUtils.GetTarget(focusTargets);

						list.Add(new BattleTarget()
						{
							SkillId = StrategyUtils.FindSkillForName("暮光灭绝", merc_iter)?.Id ?? -1,
							SkillName = "暮光灭绝",
						});
						list.Add(new BattleTarget()
						{
							TargetId = common_target?.Id ?? -1,
							TargetName = common_target?.Name ?? "",
							SkillId = StrategyUtils.FindSkillForName("法力壁垒", merc_iter)?.Id ?? -1,
							SkillName = "法力壁垒",
						});
					}
					else if (merc_iter.Name == "巴琳达·斯通赫尔斯")
					{
						List<Target> focusTargets = new List<Target>();
						//打蓝色
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role == TAG_ROLE.CASTER)));
						//打佣兵
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role != TAG_ROLE.NEUTRAL && t.Role != TAG_ROLE.INVALID)));
						Target common_target = StrategyUtils.GetTarget(focusTargets);

						list.Add(new BattleTarget()
						{
							SkillId = StrategyUtils.FindSkillForName("冰霜灼烧", merc_iter)?.Id ?? -1,
							SubSkillIndex = 0,
							SkillName = "冰霜灼烧-0",
						});
						list.Add(new BattleTarget()
						{
							TargetId = common_target?.Id ?? -1,
							TargetName = common_target?.Name ?? "",
							SkillId = StrategyUtils.FindSkillForName("冰霜之刺", merc_iter)?.Id ?? -1,
							SkillName = "冰霜之刺",
						});
					}
					else if (merc_iter.Name == "阿莱克丝塔萨")
					{
						List<Target> focusTargets = new List<Target>();
						//打绿色
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role == TAG_ROLE.FIGHTER)));
						Target common_target = StrategyUtils.GetTarget(focusTargets);

						list.Add(new BattleTarget()
						{
							TargetId = common_target?.Id ?? -1,
							TargetName = common_target?.Name ?? "",
							SkillId = StrategyUtils.FindSkillForName("红龙女王的计策", merc_iter)?.Id ?? -1,
							SkillName = "红龙女王的计策",
						});
						list.Add(new BattleTarget()
						{
							TargetId = common_target?.Id ?? -1,
							TargetName = common_target?.Name ?? "",
							SkillId = StrategyUtils.FindSkillForName("烈焰猛击", merc_iter)?.Id ?? -1,
							SkillName = "烈焰猛击",
						});
					}
					//*********************************************海盗队策略****************************************//
					else if (merc_iter.Name == "伊莉斯·逐星")
					{
						if (null == StrategyUtils.FindSpecNameTarget("火车王里诺艾", targets_friendly))
							list.Add(new BattleTarget()
							{
								SkillId = StrategyUtils.FindSkillForName("黄金猿", merc_iter)?.Id ?? -1,
								SkillName = "黄金猿",
							});
						list.Add(new BattleTarget()
						{
							SkillId = StrategyUtils.FindSkillForName("开启任务", merc_iter)?.Id ?? -1,
							SkillName = "开启任务",
						});
						list.Add(new BattleTarget()
						{
							SkillId = StrategyUtils.FindSkillForName("躲避毒镖", merc_iter)?.Id ?? -1,
							SkillName = "躲避毒镖",
						});
						list.Add(new BattleTarget()
						{
							SkillId = StrategyUtils.FindSkillForName("丛林导航", merc_iter)?.Id ?? -1,
							SkillName = "丛林导航",
						});
						list.Add(new BattleTarget()
						{
							SkillId = StrategyUtils.FindSkillForName("指引道路", merc_iter)?.Id ?? -1,
							SkillName = "指引道路",
						});
					}
					else if (merc_iter.Name == "提里奥·弗丁")
					{
						List<Target> focusTargets = new List<Target>();
						string[] preKills = new string[]
						{   "鞭笞者特里高雷", "伊莉斯·逐星", "吉安娜·普罗德摩尔", "冰雪之王洛克霍拉",
							"珑心", "米尔豪斯·法力风暴", "希尔瓦娜斯·风行者","娜塔莉·塞林",
							"沃金","变装大师","克苏恩","周卓","玉珑","恩佐斯","闪狐"
						};
						for (int i = 0; i < preKills.Length; i++)
						{
							focusTargets.Add(StrategyUtils.FindSpecNameTarget(preKills[i], targets_opposite_valid));
						}
						//打蓝色
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role == TAG_ROLE.CASTER)));
						//打佣兵
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role != TAG_ROLE.NEUTRAL && t.Role != TAG_ROLE.INVALID)));

						Target common_target = StrategyUtils.GetTarget(focusTargets);

						if (null != StrategyUtils.FindSpecNameTarget("火车王里诺艾", targets_friendly))
						{
							common_target = StrategyUtils.FindSpecNameTarget("火车王里诺艾", targets_friendly);
							list.Add(new BattleTarget()
							{
								TargetId = common_target?.Id ?? -1,
								TargetName = common_target?.Name ?? "",
								TargetType = TARGETTYPE.FRIENDLY,
								SkillId = StrategyUtils.FindSkillForName("王者祝福", merc_iter)?.Id ?? -1,
								SkillName = "王者祝福",
							});

						}

						list.Add(new BattleTarget()
						{
							TargetId = common_target?.Id ?? -1,
							TargetName = common_target?.Name ?? "",
							SkillId = StrategyUtils.FindSkillForName("谦逊制裁", merc_iter)?.Id ?? -1,
							SkillName = "谦逊制裁",
						});
						list.Add(new BattleTarget()
						{
							TargetId = common_target?.Id ?? -1,
							TargetName = common_target?.Name ?? "",
							SkillId = StrategyUtils.FindSkillForName("神圣突击", merc_iter)?.Id ?? -1,
							SkillName = "神圣突击",
						});
					}
					else if (merc_iter.Name == "海盗帕奇斯")
					{
						List<Target> focusTargets = new List<Target>();
						string[] preKills = new string[]
						{   "凯恩·血蹄", "鞭笞者特里高雷","冰雪之王洛克霍拉",
							"泰兰德·语风", "芬利爵士","沃金","玉珑","巫妖王"
						};
						for (int i = 0; i < preKills.Length; i++)
						{
							focusTargets.Add(StrategyUtils.FindSpecNameTarget(preKills[i], targets_opposite_valid));
						}
						//打红色
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role == TAG_ROLE.TANK)));
						//打佣兵
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role != TAG_ROLE.NEUTRAL && t.Role != TAG_ROLE.INVALID)));

						Target common_target = StrategyUtils.GetTarget(focusTargets);
						if (null != StrategyUtils.FindMercenaryForName("黄金猿", targets_friendly_all))
						{
							list.Add(new BattleTarget()
							{
								SkillId = StrategyUtils.FindSkillForName("全员开火", merc_iter)?.Id ?? -1,
								SkillName = "全员开火",
							});
						}
						list.Add(new BattleTarget()
						{
							SkillId = StrategyUtils.FindSkillForName("眼魔船长", merc_iter)?.Id ?? -1,
							SkillName = "眼魔船长",
						});
						list.Add(new BattleTarget()
						{
							TargetId = common_target?.Id ?? -1,
							TargetName = common_target?.Name ?? "",
							SkillId = StrategyUtils.FindSkillForName("眼魔船工", merc_iter)?.Id ?? -1,
							SkillName = "眼魔船工",
						});
					}
					else if (merc_iter.Name.IndexOf("小帕奇") == 0)
					{
						List<Target> focusTargets = new List<Target>();
						string[] preKills = new string[]
						{  "凯恩·血蹄", "鞭笞者特里高雷","冰雪之王洛克霍拉",
							"泰兰德·语风", "芬利爵士","沃金","玉珑","巫妖王"
						};
						for (int i = 0; i < preKills.Length; i++)
						{
							focusTargets.Add(StrategyUtils.FindSpecNameTarget(preKills[i], targets_opposite_valid));
						}
						//打红色
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role == TAG_ROLE.TANK)));
						//打佣兵
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role != TAG_ROLE.NEUTRAL && t.Role != TAG_ROLE.INVALID)));

						Target common_target = StrategyUtils.GetTarget(focusTargets);
						list.Add(new BattleTarget()
						{
							TargetId = common_target?.Id ?? -1,
							TargetName = common_target?.Name ?? "",
							SkillId = StrategyUtils.FindSkillForName("攻击", merc_iter)?.Id ?? -1,
							SkillName = "攻击",
						});
					}
					else if (merc_iter.Name == "艾德温，迪菲亚首脑")
					{
						List<Target> focusTargets = new List<Target>();
						string[] preKills = new string[]
						{   "吉安娜·普罗德摩尔", "冰雪之王洛克霍拉", "珑心", "米尔豪斯·法力风暴", "泰兰德·语风",
							"艾萨拉女王", "希尔瓦娜斯·风行者", "迪亚波罗","沃金" ,"希奈丝特拉",
						};
						for (int i = 0; i < preKills.Length; i++)
						{
							focusTargets.Add(StrategyUtils.FindSpecNameTarget(preKills[i], targets_opposite_valid));
						}
						//打蓝色
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role == TAG_ROLE.CASTER)));
						//打佣兵
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role != TAG_ROLE.NEUTRAL && t.Role != TAG_ROLE.INVALID)));

						Target common_target = StrategyUtils.GetTarget(focusTargets);
						if (null != StrategyUtils.FindMercenaryForName("黄金猿", targets_friendly_all))
						{
							list.Add(new BattleTarget()
							{
								TargetId = common_target?.Id ?? -1,
								TargetName = common_target?.Name ?? "",
								SkillId = StrategyUtils.FindSkillForName("首脑的悬赏", merc_iter)?.Id ?? -1,
								SkillName = "首脑的悬赏",
							});
						}
						list.Add(new BattleTarget()
						{
							SkillId = StrategyUtils.FindSkillForName("辅助打击", merc_iter)?.Id ?? -1,
							SkillName = "辅助打击",
						});
						list.Add(new BattleTarget()
						{
							TargetId = common_target?.Id ?? -1,
							TargetName = common_target?.Name ?? "",
							SkillId = StrategyUtils.FindSkillForName("刺客之刃", merc_iter)?.Id ?? -1,
							SkillName = "刺客之刃",
						});
					}
					else if (merc_iter.Name == "斯尼德")
					{
						Target common_target = (targets_opposite_valid.Count > 1) ? targets_opposite_valid[1] : targets_opposite_valid[0];
						list.Add(new BattleTarget()
						{
							TargetId = common_target?.Id ?? -1,
							TargetName = common_target?.Name ?? "",
							SkillId = StrategyUtils.FindSkillForName("嗞啦", merc_iter)?.Id ?? -1,
							SkillName = "嗞啦",
						});
					}
					//*********************************************蛇龙周策略****************************************//
					else if (merc_iter.Name == "安娜科德拉")
					{
						List<Target> focusTargets = new List<Target>();
						focusTargets.Add(StrategyUtils.FindSpecNameTarget("梦魇毒蛇", targets_friendly));
						Target common_target = StrategyUtils.GetTarget(focusTargets);
						if (null != StrategyUtils.FindMercenaryForName("沃金", targets_opposite_all))
						{
							common_target = StrategyUtils.FindMercenaryForName("沃金", targets_opposite_all);
							list.Add(new BattleTarget()
							{
								TargetId = common_target?.Id ?? -1,
								TargetName = common_target?.Name ?? "",
								SkillId = StrategyUtils.FindSkillForName("毒蛇噬咬", merc_iter)?.Id ?? -1,
								SkillName = "毒蛇噬咬",
							});
						}
						else if (null != StrategyUtils.FindMercenaryForName("梦魇毒蛇", targets_friendly_all))
						{
							list.Add(new BattleTarget()
							{
								TargetId = common_target?.Id ?? -1,
								TargetName = common_target?.Name ?? "",
								SkillId = StrategyUtils.FindSkillForName("野兽恢复", merc_iter)?.Id ?? -1,
								SkillName = "野兽恢复",
							});
						}
						else
						{
							list.Add(new BattleTarget()
							{
								SkillId = StrategyUtils.FindSkillForName("梦魇毒蛇", merc_iter)?.Id ?? -1,
								SkillName = "梦魇毒蛇",
							});
						}
					}
					else if (merc_iter.Name.IndexOf("梦魇毒蛇") == 0
						|| merc_iter.Name.IndexOf("沼沼") == 0
						|| merc_iter.Name.IndexOf("猢狲捣蛋鬼") == 0
						|| merc_iter.Name.IndexOf("蜥蜴人劫掠者") == 0)
					{
						List<Target> focusTargets = new List<Target>();
						string[] preKills = new string[]
						{   "变装大师","鞭笞者特里高雷", "冰雪之王洛克霍拉", "泰兰德·语风" , "伊莉斯·逐星",
							"魔像师卡扎库斯", "希尔瓦娜斯·风行者","艾萨拉女王","沃金",
							"火车王里诺艾","希奈丝特拉",  "芬利爵士", "艾德温·迪菲亚首脑","潮汐主母阿茜萨",
							"吉安娜·普罗德摩尔","迪亚波罗","米尔豪斯","珑心",
							"安娜科德拉","周卓","梦魇毒蛇",
						};
						for (int i = 0; i < preKills.Length; i++)
						{
							focusTargets.Add(StrategyUtils.FindSpecNameTarget(preKills[i], targets_opposite_valid));
						}
						//打佣兵
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role != TAG_ROLE.NEUTRAL && t.Role != TAG_ROLE.INVALID)));

						Target common_target = StrategyUtils.GetTarget(focusTargets);
						list.Add(new BattleTarget()
						{
							TargetId = common_target?.Id ?? -1,
							TargetName = common_target?.Name ?? "",
							SkillId = StrategyUtils.FindSkillForName("攻击", merc_iter)?.Id ?? -1,
							SkillName = "攻击",
						});
					}
					else if (merc_iter.Name == "游学者周卓")
					{
						if (null != StrategyUtils.FindMercenaryForName("冰雪之王洛克霍拉", targets_opposite_all))
						{

							if (null == StrategyUtils.FindMercenaryForName("蜥蜴人劫掠者", targets_friendly_all))
							{
								Console.WriteLine("蜥蜴人");
								list.Add(new BattleTarget()
								{
									SkillId = StrategyUtils.FindSkillForName("学识", merc_iter)?.Id ?? -1,
									SubSkillIndex = 2,
									SkillName = "学识-2",

								});
							}
							else
							{
								Console.WriteLine("蜥蜴人 耐心");
								list.Add(new BattleTarget()
								{
									SkillId = StrategyUtils.FindSkillForName("耐心", merc_iter)?.Id ?? -1,
									SkillName = "耐心",
								});
							}
						}
						else
						{
							if (targets_friendly_all.Count == 5)
							{
								list.Add(new BattleTarget()
								{
									SkillId = StrategyUtils.FindSkillForName("学识", merc_iter)?.Id ?? -1,
									SubSkillIndex = 2,
									SkillName = "学识-2",

								});
							}
							else if (null == StrategyUtils.FindMercenaryForName("猢狲捣蛋鬼", targets_friendly_all))
							{
								Console.WriteLine("猴子");
								list.Add(new BattleTarget()
								{
									SkillId = StrategyUtils.FindSkillForName("学识", merc_iter)?.Id ?? -1,
									SubSkillIndex = 1,
									SkillName = "学识-1",
								});
							}
							else
							{
								list.Add(new BattleTarget()
								{
									SkillId = StrategyUtils.FindSkillForName("耐心", merc_iter)?.Id ?? -1,
									SkillName = "耐心",
								});
							}
						}

					}
					else if (merc_iter.Name == "玛法里奥·怒风")
					{
						List<Target> focusTargets = new List<Target>();
						string[] preKills = new string[]
						{    "鞭笞者特里高雷", "泰兰德·语风", "安娜科德拉", "游学者周卓",
							"梦魇毒蛇", "希奈丝特拉", "迪亚波罗", "希尔瓦娜斯·风行者"
						};
						for (int i = 0; i < preKills.Length; i++)
						{
							focusTargets.Add(StrategyUtils.FindSpecNameTarget(preKills[i], targets_opposite_valid));
						}
						//打绿色
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role == TAG_ROLE.FIGHTER)));
						Target common_target = StrategyUtils.GetTarget(focusTargets);

						list.Add(new BattleTarget()
						{
							SkillId = StrategyUtils.FindSkillForName("大德鲁伊的召唤", merc_iter)?.Id ?? -1,
							SkillName = "大德鲁伊的召唤-1",
						});
						list.Add(new BattleTarget()
						{
							TargetId = common_target?.Id ?? -1,
							TargetName = common_target?.Name ?? "",
							SkillId = StrategyUtils.FindSkillForName("塞纳里奥波动", merc_iter)?.Id ?? -1,
							SkillName = "塞纳里奥波动",
						});
					}
					else if (merc_iter.Name == "古夫·符文图腾")
					{
						List<Target> focusTargets = new List<Target>();
						string[] preKills = new string[]
						{  "鞭笞者特里高雷", "冰雪之王洛克霍拉", "安娜科德拉",
							"游学者周卓", "梦魇毒蛇", "凯恩·血蹄", "巫妖王", "穆克拉"
						};
						for (int i = 0; i < preKills.Length; i++)
						{
							focusTargets.Add(StrategyUtils.FindSpecNameTarget(preKills[i], targets_opposite_valid));
						}
						//打红色
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role == TAG_ROLE.TANK)));
						//打佣兵
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role != TAG_ROLE.NEUTRAL && t.Role != TAG_ROLE.INVALID)));

						Target common_target = StrategyUtils.GetTarget(focusTargets);

						list.Add(new BattleTarget()
						{
							SkillId = StrategyUtils.FindSkillForName("活体荆棘", merc_iter)?.Id ?? -1,
							SkillName = "活体荆棘",
						});
					}
					else if (merc_iter.Name == "玉珑")
					{
						List<Target> focusTargets = new List<Target>();
						//打绿色
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role == TAG_ROLE.FIGHTER)));
						//打佣兵
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role != TAG_ROLE.NEUTRAL && t.Role != TAG_ROLE.INVALID)));
						Target common_target = StrategyUtils.GetTarget(focusTargets);
						if ((null != StrategyUtils.FindMercenaryForName("玛法里奥·怒风", targets_friendly_all)
							|| null != StrategyUtils.FindMercenaryForName("古夫·符文图腾", targets_friendly_all))
							&& turn >= 6)
						{
							list.Add(new BattleTarget()
							{
								TargetId = common_target?.Id ?? -1,
								TargetName = common_target?.Name ?? "",
								SkillId = StrategyUtils.FindSkillForName("氤氲之雾", merc_iter)?.Id ?? -1,
								SkillName = "氤氲之雾",
							});
							list.Add(new BattleTarget()
							{
								TargetId = common_target?.Id ?? -1,
								TargetName = common_target?.Name ?? "",
								SkillId = StrategyUtils.FindSkillForName("青玉劲风", merc_iter)?.Id ?? -1,
								SkillName = "青玉劲风",
							});
						}
						else if (targets_friendly_all.Count == 1)
						{
							list.Add(new BattleTarget()
							{
								TargetId = common_target?.Id ?? -1,
								TargetName = common_target?.Name ?? "",
								SkillId = StrategyUtils.FindSkillForName("青玉劲风", merc_iter)?.Id ?? -1,
								SkillName = "青玉劲风",
							});
						}
						else
						{
							list.Add(new BattleTarget()
							{
								SkillId = StrategyUtils.FindSkillForName("玉火打击", merc_iter)?.Id ?? -1,
								SkillName = "玉火打击",
							});
						}
					}
					else if (merc_iter.Name == "厨师曲奇")
					{
						List<Target> focusTargets = new List<Target>();
						string[] preKills = new string[]
						{  "鞭笞者特里高雷", "冰雪之王洛克霍拉", "安娜科德拉",
							"游学者周卓", "梦魇毒蛇", "凯恩·血蹄", "巫妖王", "穆克拉"
						};
						for (int i = 0; i < preKills.Length; i++)
						{
							focusTargets.Add(StrategyUtils.FindSpecNameTarget(preKills[i], targets_opposite_valid));
						}
						//打红色
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role == TAG_ROLE.TANK)));
						//打佣兵
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role != TAG_ROLE.NEUTRAL && t.Role != TAG_ROLE.INVALID)));

						Target common_target = StrategyUtils.GetTarget(focusTargets);
						if (common_target.Health > 20)
							list.Add(new BattleTarget()
							{
								SkillId = StrategyUtils.FindSkillForName("小鱼快冲", merc_iter)?.Id ?? -1,
								SkillName = "小鱼快冲",
							});
						list.Add(new BattleTarget()
						{
							TargetId = common_target?.Id ?? -1,
							TargetName = common_target?.Name ?? "",
							SkillId = StrategyUtils.FindSkillForName("鱼类大餐", merc_iter)?.Id ?? -1,
							SkillName = "鱼类大餐",
						});
					}
					//*********************************************暗影剑策略****************************************//
					else if (merc_iter.Name == "剑圣萨穆罗")
					{
						List<Target> focusTargets = new List<Target>();
						//打蓝色
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role == TAG_ROLE.CASTER)));
						//打佣兵
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role != TAG_ROLE.NEUTRAL && t.Role != TAG_ROLE.INVALID)));
						Target common_target = StrategyUtils.GetTarget(focusTargets);

						list.Add(new BattleTarget()
						{
							TargetId = common_target?.Id ?? -1,
							TargetName = common_target?.Name ?? "",
							SkillId = StrategyUtils.FindSkillForName("镜像", merc_iter)?.Id ?? -1,
							SkillName = "镜像",
						});
						list.Add(new BattleTarget()
						{
							TargetId = common_target?.Id ?? -1,
							TargetName = common_target?.Name ?? "",
							SkillId = StrategyUtils.FindSkillForName("二连击", merc_iter)?.Id ?? -1,
							SkillName = "二连击",
						});
					}
					else if (merc_iter.Name == "塔姆辛·罗姆")
					{
						List<Target> focusTargets = new List<Target>();
						//打红色
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role == TAG_ROLE.TANK)));
						//打佣兵
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role != TAG_ROLE.NEUTRAL && t.Role != TAG_ROLE.INVALID)));
						Target common_target = StrategyUtils.GetTarget(focusTargets);

						list.Add(new BattleTarget()
						{
							SkillId = StrategyUtils.FindSkillForName("暗影之幕", merc_iter)?.Id ?? -1,
							SkillName = "暗影之幕",
						});
						list.Add(new BattleTarget()
						{
							TargetId = common_target?.Id ?? -1,
							TargetName = common_target?.Name ?? "",
							SkillId = StrategyUtils.FindSkillForName("暗影箭", merc_iter)?.Id ?? -1,
							SkillName = "暗影箭",
						});
					}
					//*********************************************献祭人策略****************************************//
					else if (merc_iter.Name == "凯瑞尔·罗姆")
					{
						Console.WriteLine("攻击力:{0}", merc_iter.Attack);
						List<Target> focusTargets = new List<Target>();
						//计算伤害的函数
						//打绿色
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role == TAG_ROLE.FIGHTER)));
						//打佣兵
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role != TAG_ROLE.NEUTRAL && t.Role != TAG_ROLE.INVALID)));
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(targets_opposite_all));
						Target common_target = null;
						foreach (Target target in focusTargets)
						{
							common_target = StrategyUtils.Killable(merc_iter, target);
							if (common_target != null)
								break;
						}
						if (common_target == null)
							common_target = StrategyUtils.GetTarget(focusTargets);//打绿色
						list.Add(new BattleTarget()
						{
							TargetId = common_target?.Id ?? -1,
							TargetName = common_target?.Name ?? "",
							SkillId = StrategyUtils.FindSkillForName("远征军打击", merc_iter)?.Id ?? -1,
							SkillName = "远征军打击",
						});
					}
					else if (merc_iter.Name == "火车王里诺艾")
					{
						Target common_target = StrategyUtils.FindMinHealthTarget(targets_opposite_all);
						if (merc_iter.Health == 85)
						{
							Console.WriteLine("1");
							list.Add(new BattleTarget()
							{
								SkillId = StrategyUtils.FindSkillForName("吃炸鸡", merc_iter)?.Id ?? -1,
								SkillName = "吃炸鸡",
							});
						}
						else if (null != StrategyUtils.FindSpecNameTarget("提里奥·弗丁", targets_friendly) && merc_iter.Health == 77)
						{
							Console.WriteLine("1");
							list.Add(new BattleTarget()
							{
								SkillId = StrategyUtils.FindSkillForName("吃炸鸡", merc_iter)?.Id ?? -1,
								SkillName = "吃炸鸡",
							});
						}
						else
						{
							list.Add(new BattleTarget()
							{
								SkillId = StrategyUtils.FindSkillForName("火车王", merc_iter)?.Id ?? -1,
								SkillName = "火车王",
							});
							list.Add(new BattleTarget()
							{
								TargetId = common_target?.Id ?? -1,
								TargetName = common_target?.Name ?? "",
								SkillId = StrategyUtils.FindSkillForName("吃炸鸡", merc_iter)?.Id ?? -1,
								SkillName = "吃炸鸡",
							});
						}

					}
					else if (merc_iter.Name == "空军上将罗杰斯")
					{
						List<Target> focusTargets = new List<Target>();
						//计算伤害的函数
						//打红色
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role == TAG_ROLE.TANK)));
						//打佣兵
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role != TAG_ROLE.NEUTRAL && t.Role != TAG_ROLE.INVALID)));
						Target common_target = StrategyUtils.GetTarget(focusTargets);
						if (null != StrategyUtils.FindSpecNameTarget("克苏恩", targets_opposite_all))
						{
							list.Add(new BattleTarget()
							{
								SkillId = StrategyUtils.FindSkillForName("开火姿态", merc_iter)?.Id ?? -1,
								SkillName = "开火姿态",
							});
						}

						list.Add(new BattleTarget()
						{
							TargetId = common_target?.Id ?? -1,
							TargetName = common_target?.Name ?? "",
							SkillId = StrategyUtils.FindSkillForName("天空守卫", merc_iter)?.Id ?? -1,
							SkillName = "天空守卫",
						});
					}
					//*********************************************卡德周策略****************************************//
					else if (merc_iter.Name == "卡德加")
					{
						List<Target> focusTargets = new List<Target>();
						string[] preKills = new string[]
						{   "伊莉斯·逐星","鞭笞者特里高雷",
							"安娜科德拉", "周卓","玛法里奥·怒风","古夫·符文图腾",
							"亚煞极","恩佐斯",
							"沃金","克苏恩","希尔瓦娜斯·风行者","魔像师卡扎库斯","艾萨拉女王",
							
							"冰雪之王洛克霍拉","巴琳达·斯通赫尔斯","泰兰德·语风", "希奈丝特拉",
							"珑心", "米尔豪斯·法力风暴","火车王里诺艾",
						};
						for (int i = 0; i < preKills.Length; i++)
						{
							focusTargets.Add(StrategyUtils.FindSpecNameTarget(preKills[i], targets_opposite_valid));
						}
						//打红色
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role == TAG_ROLE.TANK)));
						//打佣兵
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role != TAG_ROLE.NEUTRAL && t.Role != TAG_ROLE.INVALID)));
						Target common_target = StrategyUtils.GetTarget(focusTargets);

						list.Add(new BattleTarget()
						{
							SkillId = StrategyUtils.FindSkillForName("暴风雪", merc_iter)?.Id ?? -1,
							SkillName = "暴风雪",
						});
						list.Add(new BattleTarget()
						{
							SkillId = StrategyUtils.FindSkillForName("炉火", merc_iter)?.Id ?? -1,
							SkillName = "炉火",
						});
					}
					else if (merc_iter.Name == "大法师卡德加")
					{
						List<Target> focusTargets = new List<Target>();
						string[] preKills = new string[]
						{   "伊莉斯·逐星","鞭笞者特里高雷",
							"安娜科德拉", "周卓","玛法里奥·怒风","古夫·符文图腾",
							"亚煞极","恩佐斯",
							"沃金","克苏恩","希尔瓦娜斯·风行者","魔像师卡扎库斯","艾萨拉女王",
							
							"冰雪之王洛克霍拉","巴琳达·斯通赫尔斯","泰兰德·语风", "希奈丝特拉",
							"珑心", "米尔豪斯·法力风暴","火车王里诺艾",
						};
						for (int i = 0; i < preKills.Length; i++)
						{
							focusTargets.Add(StrategyUtils.FindSpecNameTarget(preKills[i], targets_opposite_valid));
						}
						//打红色
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role == TAG_ROLE.TANK)));
						//打佣兵
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role != TAG_ROLE.NEUTRAL && t.Role != TAG_ROLE.INVALID)));
						Target common_target = StrategyUtils.GetTarget(focusTargets);

						list.Add(new BattleTarget()
						{
							SkillId = StrategyUtils.FindSkillForName("大法师新星", merc_iter)?.Id ?? -1,
							SkillName = "大法师新星",
							TargetId = common_target?.Id ?? -1,
							TargetName = common_target?.Name ?? "",
						});
						list.Add(new BattleTarget()
						{
							SkillId = StrategyUtils.FindSkillForName("棱光箭", merc_iter)?.Id ?? -1,
							SkillName = "棱光箭",
							TargetId = common_target?.Id ?? -1,
							TargetName = common_target?.Name ?? "",
						});
					}
					else if (merc_iter.Name == "麦迪文")
					{
						List<Target> focusTargets = new List<Target>();
						string[] preKills = new string[]
						{
							"伊莉斯·逐星","鞭笞者特里高雷",
							"安娜科德拉", "周卓","玛法里奥·怒风","古夫·符文图腾",
							"亚煞极","恩佐斯",
							"沃金","克苏恩","希尔瓦娜斯·风行者","魔像师卡扎库斯","艾萨拉女王",
							
							"冰雪之王洛克霍拉","巴琳达·斯通赫尔斯","泰兰德·语风", "希奈丝特拉",
							"珑心", "米尔豪斯·法力风暴","火车王里诺艾",
						};
						for (int i = 0; i < preKills.Length; i++)
						{
							focusTargets.Add(StrategyUtils.FindSpecNameTarget(preKills[i], targets_opposite_valid));
						}
						//打绿色
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role == TAG_ROLE.FIGHTER)));
						//打佣兵
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role != TAG_ROLE.NEUTRAL && t.Role != TAG_ROLE.INVALID)));
						Target common_target = StrategyUtils.GetTarget(focusTargets);

						list.Add(new BattleTarget()
						{
							SkillId = StrategyUtils.FindSkillForName("奥术裂隙", merc_iter)?.Id ?? -1,
							SkillName = "奥术裂隙",
							TargetId = common_target?.Id ?? -1,
							TargetName = common_target?.Name ?? "",
						});
					}
					else if (merc_iter.Name == "闪狐")
					{
						List<Target> focusTargets = new List<Target>();
						string[] preKills = new string[]
						{
							"伊莉斯·逐星","鞭笞者特里高雷",
							"安娜科德拉", "周卓","玛法里奥·怒风","古夫·符文图腾",
							"亚煞极","恩佐斯",
							"希尔瓦娜斯·风行者","沃金","克苏恩","魔像师卡扎库斯","艾萨拉女王",
							
							"冰雪之王洛克霍拉","巴琳达·斯通赫尔斯","泰兰德·语风", "希奈丝特拉",
							"珑心", "米尔豪斯·法力风暴","火车王里诺艾",
						};
						for (int i = 0; i < preKills.Length; i++)
						{
							focusTargets.Add(StrategyUtils.FindSpecNameTarget(preKills[i], targets_opposite_valid));
						}
						//打红色
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role == TAG_ROLE.TANK)));
						//打佣兵
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role != TAG_ROLE.NEUTRAL && t.Role != TAG_ROLE.INVALID)));
						Target common_target = StrategyUtils.GetTarget(focusTargets);
						if (	null != StrategyUtils.FindMercenaryForName("伊瑟拉", targets_friendly_all)
							|| null != StrategyUtils.FindMercenaryForName("贝恩·血蹄", targets_friendly_all)
							|| null != StrategyUtils.FindMercenaryForName("大法师卡德加", targets_friendly_all))
                        {
							list.Add(new BattleTarget()
							{
								SkillId = StrategyUtils.FindSkillForName("法力闪现", merc_iter)?.Id ?? -1,
								SkillName = "法力闪现",
							});
						}
						else
							list.Add(new BattleTarget()
							{
								SkillId = StrategyUtils.FindSkillForName("奥术飞掷", merc_iter)?.Id ?? -1,
								SkillName = "奥术飞掷",
								TargetId = common_target?.Id ?? -1,
								TargetName = common_target?.Name ?? "",
							});
					}
					else if (merc_iter.Name == "血怒者科尔拉克")
					{
						List<Target> focusTargets = new List<Target>();
						string[] preKills = new string[]
						{
							"亚煞极","沃金","希尔瓦娜斯·风行者","恩佐斯",
						};
						for (int i = 0; i < preKills.Length; i++)
						{
							focusTargets.Add(StrategyUtils.FindSpecNameTarget(preKills[i], targets_opposite_valid));
						}
						//打红色
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role == TAG_ROLE.TANK)));
						//打佣兵
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role != TAG_ROLE.NEUTRAL && t.Role != TAG_ROLE.INVALID)));
						Target common_target = StrategyUtils.GetTarget(focusTargets);

						list.Add(new BattleTarget()
						{
							SkillId = StrategyUtils.FindSkillForName("鲜血之怒", merc_iter)?.Id ?? -1,
							SkillName = "鲜血之怒",
							TargetId = common_target?.Id ?? -1,
							TargetName = common_target?.Name ?? "",
						});
						if(turn % 2 == 0)
							list.Add(new BattleTarget()
							{
								SkillId = StrategyUtils.FindSkillForName("升腾怒意", merc_iter)?.Id ?? -1,
								SkillName = "升腾怒意",
								TargetId = common_target?.Id ?? -1,
								TargetName = common_target?.Name ?? "",
							});
						else 
							list.Add(new BattleTarget()
							{
								SkillId = StrategyUtils.FindSkillForName("享用死亡", merc_iter)?.Id ?? -1,
								SkillName = "享用死亡",
								TargetId = common_target?.Id ?? -1,
								TargetName = common_target?.Name ?? "",
							});
					}
					else if (merc_iter.Name == "奈姆希·灵沼")
					{
						List<Target> focusTargets = new List<Target>();
						string[] preKills = new string[]
						{
							"鞭笞者特里高雷",
							"安娜科德拉", "周卓","玛法里奥·怒风","古夫·符文图腾",
							"希尔瓦娜斯·风行者","沃金","魔像师卡扎库斯","艾萨拉女王",
							"亚煞极","恩佐斯","克苏恩",
							"伊莉斯·逐星",
							"冰雪之王洛克霍拉","巴琳达·斯通赫尔斯","泰兰德·语风", "希奈丝特拉",
							"珑心", "米尔豪斯·法力风暴",
						};
						for (int i = 0; i < preKills.Length; i++)
						{
							focusTargets.Add(StrategyUtils.FindSpecNameTarget(preKills[i], targets_opposite_valid));
						}
						//打红色
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role == TAG_ROLE.TANK)));
						//打佣兵
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role != TAG_ROLE.NEUTRAL && t.Role != TAG_ROLE.INVALID)));
						Target common_target = StrategyUtils.GetTarget(focusTargets);

						list.Add(new BattleTarget()
						{
							SkillId = StrategyUtils.FindSkillForName("沼沼重击", merc_iter)?.Id ?? -1,
							SkillName = "沼沼重击",
							TargetId = common_target?.Id ?? -1,
							TargetName = common_target?.Name ?? "",
						});
					}
					else if (merc_iter.Name == "伊瑟拉")
					{

						List<Target> focusTargets = new List<Target>();
						string[] preKills = new string[]
						{   "鞭笞者特里高雷",
							"安娜科德拉", "周卓","玛法里奥·怒风","古夫·符文图腾",
							"亚煞极","恩佐斯",
							"沃金","克苏恩","希尔瓦娜斯·风行者","魔像师卡扎库斯","艾萨拉女王",
							"伊莉斯·逐星",
							"冰雪之王洛克霍拉","巴琳达·斯通赫尔斯","泰兰德·语风", "希奈丝特拉",
							"珑心", "米尔豪斯·法力风暴",
						};
						for (int i = 0; i < preKills.Length; i++)
						{
							focusTargets.Add(StrategyUtils.FindSpecNameTarget(preKills[i], targets_opposite_valid));
						}
						//打红色
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role == TAG_ROLE.CASTER)));
						Target common_target = StrategyUtils.GetTarget(focusTargets);
						list.Add(new BattleTarget()
						{
							
							SkillId = StrategyUtils.FindSkillForName("翡翠梦境", merc_iter)?.Id ?? -1,
							SkillName = "翡翠梦境-1",
							SubSkillIndex = 1,
						}) ;
						list.Add(new BattleTarget()
						{
							TargetId = common_target?.Id ?? -1,
							TargetName = common_target?.Name ?? "",
							SkillId = StrategyUtils.FindSkillForName("翠绿吐息", merc_iter)?.Id ?? -1,
							SkillName = "翠绿吐息",
						}) ;
					}
					else if (merc_iter.Name == "贝恩·血蹄")
					{

						//奶佣兵血量最少的
						Target common_target = StrategyUtils.FindMaxLossHealthTarget(targets_friendly);

						list.Add(new BattleTarget()
						{
							SkillId = StrategyUtils.FindSkillForName("大地母亲之怒", merc_iter)?.Id ?? -1,
							SkillName = "大地母亲之怒",
						});
						list.Add(new BattleTarget()
						{
							TargetId = common_target?.Id ?? -1,
							TargetName = common_target?.Name ?? "",
							TargetType = TARGETTYPE.FRIENDLY,
							SkillId = StrategyUtils.FindSkillForName("治疗链", merc_iter)?.Id ?? -1,
							SkillName = "治疗链"
						});
						common_target = StrategyUtils.FindMinHealthTarget(targets_opposite_valid.FindAll((Target t) => t.Role == TAG_ROLE.FIGHTER));
						list.Add(new BattleTarget()
						{
							TargetId = common_target?.Id ?? -1,
							TargetName = common_target?.Name ?? "",
							SkillId = StrategyUtils.FindSkillForName("莫高雷之力", merc_iter)?.Id ?? -1,
							SkillName = "莫高雷之力",
						});
					}
					//*********************************************脚本杀手****************************************//
					else if (merc_iter.Name == "邦桑迪")
					{

						if(turn == 1 && null != StrategyUtils.FindMercenaryForName("沃金", targets_opposite_all))
						{
							Target common_target = StrategyUtils.FindMercenaryForName("沃金", targets_opposite_all);
							list.Add(new BattleTarget()
							{
								SkillId = StrategyUtils.FindSkillForName("灵魂压制", merc_iter)?.Id ?? -1,
								SkillName = "灵魂压制",
								TargetId = common_target?.Id ?? -1,
								TargetName = common_target?.Name ?? "",
							});
						}
						else if(turn == 1)
                        {
							list.Add(new BattleTarget()
							{

								SkillId = StrategyUtils.FindSkillForName("无法拒绝的交易", merc_iter)?.Id ?? -1,
								SkillName = "无法拒绝的交易-2",
								SubSkillIndex = 2,
							});
						}
						else
							list.Add(new BattleTarget()
							{

								SkillId = StrategyUtils.FindSkillForName("灵魂压制", merc_iter)?.Id ?? -1,
								SkillName = "灵魂压制",
							});
					}
					else if (merc_iter.Name == "阿兰娜·逐星")
					{
						List<Target> focusTargets = new List<Target>();
						string[] preKills = new string[]
						{
							
						};
						for (int i = 0; i < preKills.Length; i++)
						{
							focusTargets.Add(StrategyUtils.FindSpecNameTarget(preKills[i], targets_opposite_valid));
						}
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role ==StrategyUtils.restrain_TAG_ROLE(merc_iter.Role))));
						Target common_target = StrategyUtils.GetTarget(focusTargets);
						list.Add(new BattleTarget()
						{
							SkillId = StrategyUtils.FindSkillForName("邪能音律", merc_iter)?.Id ?? -1,
							SkillName = "邪能音律",
						});
						
					}
					else if (merc_iter.Name == "奔波尔霸")
					{
						List<Target> focusTargets = new List<Target>();
						string[] preKills = new string[]
						{   "鞭笞者特里高雷",
							"安娜科德拉", "周卓","玛法里奥·怒风","古夫·符文图腾",
							"沃金","希尔瓦娜斯·风行者","魔像师卡扎库斯","艾萨拉女王",
							"亚煞极","恩佐斯","克苏恩",
							"伊莉斯·逐星",
							"冰雪之王洛克霍拉","巴琳达·斯通赫尔斯","泰兰德·语风", "希奈丝特拉",
							"珑心", "米尔豪斯·法力风暴",
						};
						for (int i = 0; i < preKills.Length; i++)
						{
							focusTargets.Add(StrategyUtils.FindSpecNameTarget(preKills[i], targets_opposite_valid));
						}
						//打红色
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role == TAG_ROLE.TANK)));
						//打佣兵
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role != TAG_ROLE.NEUTRAL && t.Role != TAG_ROLE.INVALID)));
						Target common_target = StrategyUtils.GetTarget(focusTargets);
						list.Add(new BattleTarget()
						{
							SkillId = StrategyUtils.FindSkillForName("气泡鱼", merc_iter)?.Id ?? -1,
							SkillName = "气泡鱼",
							TargetId = common_target?.Id ?? -1,
							TargetName = common_target?.Name ?? "",
						});
						list.Add(new BattleTarget()
						{
							SkillId = StrategyUtils.FindSkillForName("粘液时间", merc_iter)?.Id ?? -1,
							SkillName = "粘液时间",
							TargetId = common_target?.Id ?? -1,
							TargetName = common_target?.Name ?? "",
						});
					}
					else if (merc_iter.Name.IndexOf("冲锋鱼人") == 0)
                    {
						if(turn == 1)
                        {
							list.Add(new BattleTarget()
							{
								MercName = merc_iter.Name,
								NeedActive = false,
							});
						}
						else
                        {
							List<Target> focusTargets = new List<Target>();
							string[] preKills = new string[]
							{   "变装大师","鞭笞者特里高雷", "冰雪之王洛克霍拉", "沃金","泰兰德·语风" , "伊莉斯·逐星",
							"魔像师卡扎库斯", "希尔瓦娜斯·风行者","艾萨拉女王",
							"火车王里诺艾","希奈丝特拉",  "芬利爵士", "艾德温·迪菲亚首脑","潮汐主母阿茜萨",
							"吉安娜·普罗德摩尔","迪亚波罗","米尔豪斯","珑心",
							"安娜科德拉","周卓","梦魇毒蛇",
							};
							for (int i = 0; i < preKills.Length; i++)
							{
								focusTargets.Add(StrategyUtils.FindSpecNameTarget(preKills[i], targets_opposite_valid));
							}
							//打佣兵
							focusTargets.Add(StrategyUtils.FindMinHealthTarget(
								targets_opposite_valid.FindAll((Target t) => t.Role != TAG_ROLE.NEUTRAL && t.Role != TAG_ROLE.INVALID)));

							Target common_target = StrategyUtils.GetTarget(focusTargets);
							list.Add(new BattleTarget()
							{
								TargetId = common_target?.Id ?? -1,
								TargetName = common_target?.Name ?? "",
								SkillId = StrategyUtils.FindSkillForName("攻击", merc_iter)?.Id ?? -1,
								SkillName = "攻击",
							});
						}
                    }
					else if (merc_iter.Name == "重拳先生")
					{
						List<Target> focusTargets = new List<Target>();
						string[] preKills = new string[]
						{   "变装大师","鞭笞者特里高雷", "冰雪之王洛克霍拉", "沃金","泰兰德·语风" , "伊莉斯·逐星",
							"魔像师卡扎库斯", "希尔瓦娜斯·风行者","艾萨拉女王",
							"火车王里诺艾","希奈丝特拉",  "芬利爵士", "艾德温·迪菲亚首脑","潮汐主母阿茜萨",
							"吉安娜·普罗德摩尔","迪亚波罗","米尔豪斯","珑心",
							"安娜科德拉","周卓","梦魇毒蛇",
						};
						for (int i = 0; i < preKills.Length; i++)
						{
							focusTargets.Add(StrategyUtils.FindSpecNameTarget(preKills[i], targets_opposite_valid));
						}
						//打佣兵
						focusTargets.Add(StrategyUtils.FindMinHealthTarget(
							targets_opposite_valid.FindAll((Target t) => t.Role != TAG_ROLE.NEUTRAL && t.Role != TAG_ROLE.INVALID)));

						Target common_target = StrategyUtils.GetTarget(focusTargets);

						list.Add(new BattleTarget()
						{
							SkillId = StrategyUtils.FindSkillForName("落水追击", merc_iter)?.Id ?? -1,
							SkillName = "落水追击",
						});
						list.Add(new BattleTarget()
						{
							SkillId = StrategyUtils.FindSkillForName("重拳猛击", merc_iter)?.Id ?? -1,
							SkillName = "重拳猛击",
						});
					}
					else if (merc_iter.Name == "洛卡拉")
					{
						list.Add(new BattleTarget()
						{
							SkillId = StrategyUtils.FindSkillForName("进攻集结", merc_iter)?.Id ?? -1,
							SkillName = "进攻集结",
						});
					}
					else if (merc_iter.Name == "考内留斯·罗姆")
					{

						if (null != StrategyUtils.FindMercenaryForName("重拳先生", targets_friendly_all))
						{
							List<Target> focusTargets = new List<Target>();
							focusTargets.Add(StrategyUtils.FindMaxLossHealthTarget(targets_friendly));
							Target common_target = StrategyUtils.GetTarget(focusTargets);
							list.Add(new BattleTarget()
							{
								TargetId = common_target?.Id ?? -1,
								TargetName = common_target?.Name ?? "",
								SkillId = StrategyUtils.FindSkillForName("牺牲祝福", merc_iter)?.Id ?? -1,
								TargetType = TARGETTYPE.FRIENDLY,
								SkillName = "牺牲祝福",
							});
						}
						else
						{
							List<Target> focusTargets = new List<Target>();
							string[] preKills = new string[]
							{
								"黄金猿", "泰兰德·语风", "迪亚波罗", "希奈丝特拉", "冰雪之王洛克霍拉"
							};
							for (int i = 0; i < preKills.Length; i++)
							{
								focusTargets.Add(StrategyUtils.FindSpecNameTarget(preKills[i], targets_opposite_valid));
							}
							//打绿色
							focusTargets.Add(StrategyUtils.FindMinHealthTarget(
								targets_opposite_valid.FindAll((Target t) => t.Role == TAG_ROLE.CASTER)));
							//打佣兵
							focusTargets.Add(StrategyUtils.FindMinHealthTarget(
								targets_opposite_valid.FindAll((Target t) => t.Role != TAG_ROLE.NEUTRAL && t.Role != TAG_ROLE.INVALID)));

							Target common_target = StrategyUtils.GetTarget(focusTargets);
							list.Add(new BattleTarget()
							{
								TargetId = common_target?.Id ?? -1,
								TargetName = common_target?.Name ?? "",
								SkillId = StrategyUtils.FindSkillForName("武艺精通", merc_iter)?.Id ?? -1,
								SkillName = "武艺精通",
							});
						}
					}

					//*********************************************默认不动策略****************************************//
					else if (merc_iter.Name.IndexOf("盔中寄居蟹") == 0 ||
						merc_iter.Name.IndexOf("剑鱼") == 0 ||
						merc_iter.Name.IndexOf("闪光翻车鱼") == 0||
						merc_iter.Name.IndexOf("根基图腾") == 0 ||
						merc_iter.Name.IndexOf("黄金猿") == 0)
					{
						if(null != StrategyUtils.FindMercenaryForName("贝恩·血蹄", targets_opposite_all))
                        {
							list.Add(new BattleTarget()
							{
								SkillId = StrategyUtils.FindSkillForName("攻击", merc_iter)?.Id ?? -1,
								SkillName = "攻击",
							});
						}
						else
                        {
							list.Add(new BattleTarget()
							{
								MercName = merc_iter.Name,
								NeedActive = false,
							});
						}
					}
					else if (merc_iter.Name.IndexOf("奥术结界") == 0)
                    {
						if(turn == 2 && null == StrategyUtils.FindMercenaryForName("鞭笞者特里高雷", targets_opposite_all) 
							&& null == StrategyUtils.FindMercenaryForName("沃金", targets_opposite_all))
                        {
							list.Add(new BattleTarget()
							{
								SkillId = StrategyUtils.FindSkillForName("攻击", merc_iter)?.Id ?? -1,
								SkillName = "攻击",
							});
						}
						else
                        {
							list.Add(new BattleTarget()
							{
								MercName = merc_iter.Name,
								NeedActive = false,
							});
						}

					}
				}
			}
			catch (Exception ex)
			{
				Console.WriteLine("空间名：" + ex.Source + "；" + '\n' +
					"方法名：" + ex.TargetSite + '\n' +
					"故障点：" + ex.StackTrace.Substring(ex.StackTrace.LastIndexOf("\\") + 1, ex.StackTrace.Length - ex.StackTrace.LastIndexOf("\\") - 1) + '\n' +
					"错误提示：" + ex.Message + '\n' +
					"XXX：" + ex.ToString()
					);
			}

			return list;
		}
		public string Name()
		{
			return PvpNormal.StrategyName;
		}

	}
}
